package com.xxxy.dongyexuan.action;


import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;

@CrossOrigin
@RestController
public class UploadAction {
    @PostMapping("/upload")
    public void upload(MultipartFile file)
            throws Exception{
        file.transferTo(new File("d:/bootimage/"+file.getOriginalFilename()));
    }
}
